home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 980 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: "Nathan Myers, http://www.cantrip.org/" <ncm@cantrip.org>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: string::npos is unhandy and dangerous
  5. Date: 06 Apr 1996 11:33:01 PST
  6. Organization: The Cantrip Cooperative
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <3164B306.7B53B7FB@cantrip.org>
  9. References: <news:4k06dh$kni@penguin.doc.ic.ac.uk> <4k1s4j$jk0@bmtlh10.bnr.ca>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Thu, 04 Apr 1996 21:43:34 -0800
  12. X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMWbG7ky4NqrwXLNJAQErDQIAqTlC6BrT7lELem5f9tgXtHWvaXapTBNu
  15.     L4B1njMtm5M3e6CNN3UCbO5JIE443/lQhu9k5ziAL9W5gXKJKDktZA==
  16.     =ik3c
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. john (j.d.) hickin <hickin@nortel.ca> wrote:
  20. > The basic problem has been already been noted raised by Mr. Kanze.  Because
  21. > the basic_string contains the following declaration:
  22. >          static const size_type npos = -1;
  23. > it is evident that there is a constraint that size_type must be something thay
  24. > can be constructed from an integral type.  I can't quite recall the wording of
  25. > the original post but it was made clear that size_type cannot be arbitrary.
  26.  
  27. This is very astute.  The question of how npos should specified
  28. is still up for discussion, for just the reason John mentioned.  
  29. Clearly, the standard must not constrain allocators in this way
  30. just allow the basic_string template to be described more conveniently.
  31.  
  32. Nathan Myers
  33. ncm@cantrip.org
  34. ---
  35. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  36.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  37.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  38.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  39.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  40. ]
  41.